<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>Cron生成器</title>
	<meta charset="utf8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.2.0/css/bootstrap.min.css" type="text/css" />
	<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
	<div class="container">
		<h1 class="page-heading">Cron生成器</h1>
		<p>应用名（你建立的应用）：<input type="text" id="appname" class="form-control"></p>
		<p>应用版本：<input type="text" id="appver" class="form-control"></p>
		<p>安装目录（根目录请留空。其他目录末尾需要加“/“，如tbhelper/）：<input type="text" id="dir" class="form-control"></p>
		<p>时间间隔（单位：分钟。60以内）：<input type="text" id="timesplit" class="form-control"></p>
		<p><input type="button" id="submit" class="btn btn-primary" value="生成"></p>
		<p><textarea id="result" class="form-control" style="height:400px"></textarea></p>
	</div>
	<textarea id="tpl" style="display:none">name: -appname-
version: -appver-
handle:
- compress: if ( out_header["Content-type"] ~ "text/css" ) compress
- compress: if ( out_header["Content-type"] ~ "text/html" ) compress
cron:
    - description: SYTbHelper
      url: -dir-cron.php
      schedule: */-timesplit- * * * *</textarea>
	<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
	<script src="http://cdn.bootcss.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
	<script>
	$('#submit').click(function(){
		var txt=$('#tpl').val();
		txt=txt.replace('-appname-',$('#appname').val());
		txt=txt.replace('-dir-',$('#dir').val());
		txt=txt.replace('-appver-',$('#appver').val());
		txt=txt.replace('-timesplit-',$('#timesplit').val());
		$('#result').val(txt);
	});
	</script>
</body>
</html>